home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / DYN401.ZIP / kernel / port / stack.c < prev    next >
C/C++ Source or Header  |  1994-06-11  |  257b  |  22 lines

  1.  
  2. #include <stdio.h>
  3.  
  4. main(void)
  5. {
  6.     char    x[100];
  7.  
  8.     fun(x);
  9. }
  10.  
  11. fun(char *x)
  12. {
  13.     if (x < (char *) &x)
  14.         printf("STACK GROWS UP\n");
  15.     else
  16.         printf("STACK GROWS DOWN\n");
  17.     if (&x[0] < &x[10])
  18.         printf("ARRAYS GROW UP\n");
  19.     else
  20.         printf("ARRAYS GROW DOWN\n");
  21. }
  22.